package newone;

class students{
	String name;
	int age;
	String grade;
	computer c;
}

class computer{
	String brand;
	int storage;
	String cpu;	
}

public class Student {
	public static void main(String args[]) {
		students a = new students();
		computer b = new computer();
		a.name = "张三";
		a.age = 18;
		a.grade = "高二";
		b.brand = "华为";
		b.storage = 128;
		b.cpu = "麒麟900";
		a.c = b;
		System.out.println("姓名："+a.name+"    年龄："+a.age+"    年级："+a.grade+"    电脑品牌："+b.brand+"    电脑内存："+b.storage+"G"+"    电脑cpu类型："+b.cpu);
		students c = new students();
		computer d = new computer();
		c.name = "李四";
		c.age = 21;
		c.grade = "大二";
		d.brand = "苹果";
		d.storage = 512;
		d.cpu = "Core i9";
		c.c = d;
		System.out.println("姓名："+c.name+"    年龄："+c.age+"    年级："+c.grade+"    电脑品牌："+d.brand+"    电脑内存："+d.storage+"G"+"    电脑cpu类型："+d.cpu);
		students e = new students();
		computer f = new computer();
		e.name = "王五";
		e.age = 22;
		e.grade = "大三";
		f.brand = "惠普";
		f.storage = 256;
		f.cpu = "Core i7";
		e.c = f;
		System.out.println("姓名："+e.name+"    年龄："+e.age+"    年级："+e.grade+"    电脑品牌："+f.brand+"    电脑内存："+f.storage+"G"+"    电脑cpu类型："+f.cpu);

	}

}
